#!/usr/bin/env python
# encoding: utf-8

import os,pymysql
import traceback

try:
   sql = 'show databases;'
   conn = pymysql.connect(host='192.168.1.103', user='root', passwd='123456', db='ekcpsd_1.5.3', port=3306,charset='utf8')
   cur = conn.cursor()
   data=cur.execute(sql,tup)
   conn.commit()
   data = cur.fetchall()
   cur.close()
   conn.close()
   print data
except Exception as e:
   traceback.print_exc()
